package com.hsy.crm.web.domain.entity;

import com.hsy.crm.web.domain.cm.Validate;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * 库存明细
 *
 */
@Table(name = "t_store_product_detail")
public class StoreProductDetail extends BaseEntity{

    @Validate
    @Column(length = 19)
    private Long storeProductId;

    /**
     * 批次号
     */
    @Column(length = 30)
    private String batchNo;

    /**
     * 生产日期
     */
    @Column(length = 19)
    private Long productDate;

    /**
     * 来源
     */
    @Column(length = 11)
    private Integer orderType;

    /**
     * 来源id
     */
    @Validate
    @Column(length = 11)
    private Long orderId;

    /**
     * 来源id
     */
    @Column(length = 11)
    private Long orderDetailId;

    /**
     * 本次出入库数量（对应订单明细number）
     */
    @Column(length = 11)
    private Long number;

    /**
     * 本次出入库总额（对应number属性的真实总价  包含各种成本）
     */
    @Column(length = 19)
    private Long price;

    /**
     * 入库时间（退货时该时间不变）
     */
    @Column(length = 19)
    private Long time;

    /**
     * 出入库类型0出库  1入库
     */
    @Column(length = 11)
    private Integer type;

    /**
     * 已出入库数量（对应订单明细number）
     */
    @Column(length = 11)
    private Long outNumber;

    /**
     * 本次出入库总额（对应outNumber属性的成本）
     */
    @Column(length = 19)
    private Long outPrice;

    /**
     * 本次出入库未找到成本的数量的临时成本总额
     */
    @Column(length = 19)
    private Long tmpPrice;

    /**
     * （以前的可能含义：明细数据失效 不再参与销售利润处理）
     */
    @Column(length = 19)
    private Integer rushBack;

    /**
     * 已退数量  默认为0
     */
    @Column(length = 19)
    private Long backNumber;


    /**
     * int类型（非新明细  本身就是原来的明细  任何明细的sort都不会一样【不一定正确】）
     */
    @Validate
    @Column(length = 19)
    private Long sort;

    /**
     * 入库：该条入库明细被哪个出库明细使用的出库明细sort
     * 出库：使用的入库的sort
     */
    @Validate
    @Column(length = 19)
    private Long relationStartSort;

    @Validate
    @Column(length = 19)
    private Long relationEndSort;

    public Long getProductDate() {
        return productDate;
    }

    public void setProductDate(Long productDate) {
        this.productDate = productDate;
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public Long getBackNumber() {
        return backNumber;
    }

    public void setBackNumber(Long backNumber) {
        this.backNumber = backNumber;
    }

    public Integer getRushBack() {
        return rushBack;
    }

    public void setRushBack(Integer rushBack) {
        this.rushBack = rushBack;
    }

    public Long getTmpPrice() {
        return tmpPrice;
    }

    public void setTmpPrice(Long tmpPrice) {
        this.tmpPrice = tmpPrice;
    }

    public Long getRelationStartSort() {
        return relationStartSort;
    }

    public void setRelationStartSort(Long relationStartSort) {
        this.relationStartSort = relationStartSort;
    }

    public Long getRelationEndSort() {
        return relationEndSort;
    }

    public void setRelationEndSort(Long relationEndSort) {
        this.relationEndSort = relationEndSort;
    }

    public Long getOutNumber() {
        return outNumber;
    }

    public void setOutNumber(Long outNumber) {
        this.outNumber = outNumber;
    }

    public Long getOutPrice() {
        return outPrice;
    }

    public void setOutPrice(Long outPrice) {
        this.outPrice = outPrice;
    }

    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public Long getStoreProductId() {
        return storeProductId;
    }

    public void setStoreProductId(Long storeProductId) {
        this.storeProductId = storeProductId;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public Long getOrderDetailId() {
        return orderDetailId;
    }

    public void setOrderDetailId(Long orderDetailId) {
        this.orderDetailId = orderDetailId;
    }

    public Long getNumber() {
        return number;
    }

    public void setNumber(Long number) {
        this.number = number;
    }

    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }

    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }
}
